<template>
  <div class="share" v-show="value" @click="showShare">
    <div class="share-arrow"></div>
    <div class="share-text">
      <div>
        <i class="share-text-friend"></i>
        <i class="share-text-circle"></i>
        <span class="share-text-desc">
        <slot>打开微信分享发送</slot>
      </span>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      value: {
        type: Boolean
      }
    },
    name: 'index',
    methods: {
      showShare () {
        this.$emit('input', false)
      }
    }
  }
</script>

<style lang="less">
  .share {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    top: 0;
    background-color: rgba(30, 26, 25, 0.63);
    z-index: 10;
    padding: 40px 30px;
    color: #fff;

    .share-arrow {
      height: 50%;
      width: 100%;
      background: url("../../assets/img/shareArrow.png") no-repeat right;
      background-size: contain;
      transform: rotate(8deg);
    }

    .share-text {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 10px;

      i {
        display: inline-block;
        width: 30px;
        height: 30px;
        background-size: cover;
        background-repeat: no-repeat;
        vertical-align: middle;
        margin-right: 3px;
      }

      .share-text-circle {
        background-image: url("../../assets/img/weixin_q.png");
      }

      .share-text-friend {
        width: 36px;
        height: 36px;
        background-image: url("../../assets/img/weixin_f.svg");
      }

    }
  }
</style>
